package cn.trigram.config;

import org.springframework.cloud.gateway.filter.ratelimit.AbstractRateLimiter;
import org.springframework.cloud.gateway.support.ConfigurationService;
import org.springframework.context.ApplicationEvent;
import reactor.core.publisher.Mono;

/**
 * 网关速率限制器
 *
 * @author 一日看尽长安花
 * @date 2022/02/21 18:31:56
 * @see <a href="http://www.imooc.com/article/290828">Spring Cloud Gateway限流详解</a>
 */
public class GatewayRateLimiter extends AbstractRateLimiter {

  protected GatewayRateLimiter(
      Class configClass, String configurationPropertyName,
      ConfigurationService configurationService
  ) {

    super(configClass, configurationPropertyName, configurationService);
  }

  @Override
  public Mono<Response> isAllowed(String routeId, String id) {

    return null;
  }

  @Override
  public void onApplicationEvent(ApplicationEvent applicationEvent) {

  }

}
